package com.test.pattern.mediator;

/**
 * @ClassName: Tenant
 * @description:
 * @author: Mr du
 * @create: 2024-03-17 16:18
 */
public class Tenant extends Person{

    public Tenant(String name, Mediator mediator) {
        super(name, mediator);
    }

    //和中介联系沟通
    public void constact(String message){
        mediator.constact(message,this);
    }

    //获取信息
    public void getMessage(String message){
        System.out.println("租房者"+name+"获取到的信息是:"+message);
    }
}
